package cn.wangqi.personal.service.impl;

import cn.wangqi.personal.dao.CollageDao;
import cn.wangqi.personal.domain.Collage;
import cn.wangqi.personal.service.ICollageService;
import cn.wangqi.personal.util.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by admin on 2017/9/7.
 */
@Service
public class CollageService implements ICollageService{

    @Resource
    public CollageDao collageDao;

    @Override
    public void saveCollage(Collage collage) {
        collageDao.saveCollage(collage);
    }

    @Override
    public List<Collage> listCollage(Page page) {
        return collageDao.listCollage(page);
    }

    @Override
    public int countCollage() {
        return collageDao.countCollage();
    }

    @Override
    public void deleteCollageById(int collageId) {
        collageDao.deleteCollageById(collageId);
    }

    @Override
    public Collage findCollageById(int collageId) {
        return collageDao.findCollageById(collageId);
    }

    @Override
    public void updateCollage(Collage collage) {
        collageDao.updateCollage(collage);
    }


}
